<template>
	<view class="">
		我是child组件--{{userinfo.username}}--{{userinfo.age}}
		<button @click="emitFn">子传父</button>
	</view>
</template>

<script>
	export default{
		name:'mychild',
	    data(){
			return {
				sayword:'好好学习,天天向上'	
			}
		},
		props:['userinfo'],
		methods:{
			emitFn(){
				this.$emit('myevent',this.sayword)
				
			}
		}
	}
	
</script>

<style>
	
</style>